/*
 * Copyright (c) 2006 Jordan Bayliss-McCulloch
 * Email: j.baylissmcculloch@gmail.com
 */

import java.awt.*;

public class News {

	
	/**
	 * @param args
	 */
	public static void main(String[] args) throws Exception {
	
		/* UNCOMMENT below to use a proxy server
		System.getProperties().put( "proxySet", "true" );
		System.getProperties().put( "proxyHost", "192.168.0.3" );
		System.getProperties().put( "proxyPort", "3128" );
		*/
		NewsRegion[] regions = {
				new NewsRegion("Oceania", "http://rss.news.yahoo.com/rss/oceania", new Color(128,0,128)),
				new NewsRegion("Africa", "http://rss.news.yahoo.com/rss/africa", new Color(0,255,128)),
				new NewsRegion("US", "http://rss.news.yahoo.com/rss/us", new Color(0,0,255)),

				new NewsRegion("Europe", "http://rss.news.yahoo.com/rss/europe", new Color(0,128,0)),
				new NewsRegion("Britain", "http://rss.news.yahoo.com/rss/britain", new Color(0,255,0)),
				new NewsRegion("Russia", "http://rss.news.yahoo.com/rss/russia", new Color(128,255,255)),
				
				new NewsRegion("Latin America", "http://rss.news.yahoo.com/rss/latam", new Color(255,255,0)),
				new NewsRegion("Brazil", "http://rss.news.yahoo.com/rss/brazil", new Color(255,128,64)),
				//new NewsRegion("Mexico", "http://rss.news.yahoo.com/rss/mexico", new Color(128,128,0)),
				new NewsRegion("Mexico", "http://rss.news.yahoo.com/rss/latam", new Color(128,128,0)),
				
				new NewsRegion("Japan", "http://rss.news.yahoo.com/rss/japan", new Color(0,0,0)),
				new NewsRegion("China", "http://rss.news.yahoo.com/rss/china", new Color(128,64,0)),
				new NewsRegion("Asia", "http://rss.news.yahoo.com/rss/asia", new Color(128,128,255)),
				new NewsRegion("India", "http://rss.news.yahoo.com/rss/india", new Color(128,0,0)),
				new NewsRegion("North Korea", "http://rss.news.yahoo.com/rss/nkorea", new Color(255,0,255)),
				new NewsRegion("Iran", "http://rss.news.yahoo.com/rss/iran", new Color(255,255,128)),
				new NewsRegion("Iraq", "http://rss.news.yahoo.com/rss/iraq", new Color(0,64,64)),
			
				new NewsRegion("Middle East", "http://rss.news.yahoo.com/rss/mideast", new Color(0,128,128))
				
				
		};
		 
		  
		int width=1420,height=655;
		float scale = 1.0f;
		width *= scale; height *= scale;
		
		NewsImage newsImage = new NewsImage("Blank.png"); 
		newsImage.compile( regions, width/2, height/2, "Latest.png");

		return;
	}

}
